#define _CRT_SECURE_NO_WARNINGS 1

int ListInsert(SqList& L, int i, ElemType e) {
    if (i - 1 < 0)
        return 0;
    if (i - 1 > L.length)
        return 0;
    if (L.length + 1 > MAXSIZE)
        return 0;
    for (int j = L.length; j > i - 1; j--) {
        L.elem[j] = L.elem[j - 1];
    }
    L.length++;;
    L.elem[i - 1] = e;
    return 1;
}
